/*
 * @Description: 
 * @Version: 
 * @Autor: LiChuang
 * @Date: 2023-11-13 22:38:27
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2023-11-15 22:04:02
 */
import request from "@/utils/request";
import { AxiosPromise } from "axios";
import { CaptchaResult, LoginData, LoginResult } from "./types";

/**
 * 登录API
 *
 * @param data {LoginData}
 * @returns
 */
export function loginApi(data: LoginData): AxiosPromise<LoginResult> {
  return request({
    url: "/pharmacist/pwd/login",
    method: "post",
    data: data,
  });
}

/**
 * 注销API
 */
export function logoutApi() {
  return request({
    url: "/api/v1/auth/logout",
    method: "delete",
  });
}

